﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ERP.ERPSystem.ProductionSystem.Dto;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace ERP.ERPSystem.ProductionSystem
{
    /// <summary>
    /// 车间设置服务接口
    /// </summary>
    public interface IWorkshopServer : IApplicationService
    {
        /// <summary>
        /// 根据ID获取单个车间信息
        /// </summary>
        /// <param name="id">车间实体的ID</param>
        /// <returns>返回找到的车间DTO</returns>
        Task<WorkshopDTO> GetAsync(int id);

        /// <summary>
        /// 根据查询条件分页获取车间列表
        /// </summary>
        /// <param name="input">包含分页和筛选条件的对象</param>
        /// <returns>返回分页的车间列表</returns>
        Task<PagedResultDto<WorkshopDTO>> GetListAsync(GetWorkshopInputDto input);

        /// <summary>
        /// 创建一个新的车间
        /// </summary>
        /// <param name="input">用于创建车间的DTO对象</param>
        /// <returns>返回新创建的车间DTO</returns>
        Task<WorkshopDTO> CreateAsync(CreateUpdateWorkshopDto input);

        /// <summary>
        /// 根据ID更新一个已存在的车间
        /// </summary>
        /// <param name="id">要更新的车间实体的ID</param>
        /// <param name="input">包含更新信息的DTO对象</param>
        /// <returns>返回更新后的车间DTO</returns>
        Task<WorkshopDTO> UpdateAsync(int id, CreateUpdateWorkshopDto input);

        /// <summary>
        /// 根据ID删除一个车间
        /// </summary>
        /// <param name="id">要删除的车间实体的ID</param>
        Task DeleteAsync(int id);
        
        /// <summary>
        /// 批量删除车间
        /// </summary>
        /// <param name="ids">要删除的车间ID的集合</param>
        Task DeleteManyAsync(IEnumerable<int> ids);
    }
}
